<div class="member-main">
    <div id="tab-discus" class="section switch">
        <ul class="switchable-triggerBox clearfix">
            <li ><a href="<{link app=b2c ctl='site_member' act='comment'}>"><{t}>我的评论<{/t}></a></li>
            <li><a href="<{link app=b2c ctl='site_member' act='ask'}>"><{t}>我的咨询<{/t}></a></li>
            <li class="active" ><a href="#"><{t}>站内信<{/t}></a></li>
        </ul>
        <div class="switchable-content" >
            <div class="switchable-panel">
                <div id="message-tab" class="switch" style="padding-top:0">
                    <div class="site-mail">
                        <ul class="switchable-triggerBox2 clearfix">
                            <li><a href="<{link app=b2c ctl='site_member' act='send'}>"><{t}>发送消息<{/t}></a></li>
                            <li><a href="<{link app=b2c ctl='site_member' act='inbox'}>"><{t}>收件箱<{/t}></a><{if $inbox_num}><span>(<{$inbox_num}>)</span><{/if}></li>
                            <li><a href="<{link app=b2c ctl='site_member' act='track'}>"><{t}>发件箱<{/t}></a><span></span></li>
                            <li class="active"><{t}>草稿箱<{/t}><{if $outbox_num}><span>(<{$outbox_num}>)</span><{/if}></li>
                            <li style="border:none"><a href="<{link app=b2c ctl='site_member' act='message'}>"><{t}>给管理员发站内信<{/t}></a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <script>
                function checkAll(obj,box) {
                    var tag = obj.getElementsByTagName('input');
                    for(var i = 0;i < tag.length;i++){
                        tag[i].checked = box.checked;
                    }
                }
            </script>
            <div class="title"><{t}>草稿箱<{/t}></div>
            <form action="<{link app=b2c ctl='site_member' full='1' act='del_out_box_msg'}>" method="post">
                <table width="100%" cellspacing="0" cellpadding="0" class="liststyle-option">
    <col class="span-1 textcenter"></col>
    <col class=" textleft"></col>
                    <tr>
                        <th class="textcenter"><input type="checkbox" onclick="checkAll(this.form,this)" name="chkall" id="chkall" title="<{t}>全选<{/t}>"></th>
                        <td>
                            <{button type="submit" name="pmsend" label=$___b2c="删除"|t:'b2c' rel="_request"}>
                        </td>
                        <td style="padding-right:10px; text-align:right"><{t}>共有短消息:<{/t}>&nbsp;<em id="pmtotalnum" class="siteparttitle-orage"><{$total_msg}></em></td>
                    </tr>
                </table>
                <table width="100%" cellspacing="0" cellpadding="0" summary="<{t}>草稿箱<{/t}>" class="gridlist">
     <col class="span-1 bg-graydark"></col>
    <col class="span-15 textleft"></col>
    <col class="span-3 bg-orange"></col>
    <col class="span-4"></col>
                    <thead>
                        <tr>
                            <th class="selector">&nbsp;</th>
                            <th><{t}>标题<{/t}></th>
                            <th class="user"><{t}>发送到<{/t}></th>
                            <th class="time"><{t}>时间<{/t}></th>
                        </tr>
                    </thead>
                    <tbody>
                        <{if count($message)>0}>
                        <{foreach item=msg from=$message}>
                        <tr>
                            <td class="textcenter"><input type="checkbox" value=<{$msg.comment_id}> name="deloutbox[]"></td>
                            <td><span><a href="<{if $msg.to_id == 1}><{link app='b2c' ctl="site_member" act="message" arg0=$msg.comment_id}><{else}><{link app='b2c' ctl="site_member" act="send" arg0=$msg.comment_id}><{/if}>" class="lnk"><{$msg.title|cut:60|nl2br}></a></span></td>
                            <td class="textcenter"><{if $msg.to_type == 1}><{t}>管理员<{/t}><{else}><{$msg.to_uname|escape:'html'}><{/if}></td>
                            <td class="textcenter"><{$msg.time|cdate:FDATE_STIME}></td>
                        </tr>
                        <tr id="view_msg_pro_<{$msg.comment_id}>" style="display:none">
                            <td></td>
                            <td id="view_msg_<{$msg.comment_id}>"  class="msgcnt lft" colspan="3">&nbsp;</td>
                        </tr>
                        <{/foreach}>
                        <{else}>
                        <tr>
                            <td height="60" colspan="4" class="bg-white" style="padding:0 10px">
                                <{t}> 草稿箱中无内容<{/t}>
                            </td>
                        </tr>
                        <{/if}>
                    </tbody>
                </table>
                <table width="100%" cellspacing="0" cellpadding="0" class="liststyle-option">
    <col class="span-1 textcenter"></col>
    <col class=" textleft"></col>
                    <tr>
                        <th class="textcenter"><input type="checkbox" onclick="checkAll(this.form,this)" name="chkall" id="chkall" title="<{t}>全选<{/t}>"></th>
                        <td>
                            <{button type="submit" name="pmsend" label=$___b2c="删除"|t:'b2c' rel="_request"}>
                        </td>
                        <td style="padding-right:10px; text-align:right"><{t}>共有短消息:<{/t}>&nbsp;<em id="pmtotalnum" class="siteparttitle-orage"><{$total_msg}></em></td>
                    </tr>

                </table>
                <{pagers data=$pager}>
            </form>
        </div>
    </div>
</div>
